package com.dnjn.mes.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.mes.common.core.domain.BaseEntity;

import java.io.Serializable;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author Amber
 * @since 2023-08-21
 */
@Getter
@Setter
@TableName("mes_workforce_xref")
public class MesWorkforceXref extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @NotNull(message = "userId不能为空")
    private Long userId;

    private Long workforceId;

    private Long equipmentId;

    /**
     * sys_user.user_name
     */
    @NotBlank(message = "userName不能为空")
    private String userName;

    /**
     * 是否删除|0-否 1-是|valid
     */
    private String deleted;

    @TableField(exist = false)
    private Boolean admin;

}
